package com.czy.workflow.display.service;

import com.czy.workflow.core.model.FlowMain;
import com.czy.workflow.core.model.FlowNode;
import com.czy.workflow.core.service.dao.MainRepository;
import com.czy.workflow.core.service.dao.NodeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DisplayService {

    @Autowired MainRepository mainRepository;


    @Autowired NodeRepository nodeRepository;

    public List<FlowMain> listFlowMains(){
        return mainRepository.findAll();
    }

    public List<FlowNode> listRuntimeNodes(){
        return nodeRepository.findRuntimeNodes();
    }

}
